<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:ReflectionIT.Silverlight.ReportLibrary">


    <Style TargetType="local:ReportHeader">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ReportHeader">
                    <Border x:Name="LayoutRoot" BorderThickness="2" BorderBrush="Black" CornerRadius="3" Margin="0,0,0,5" >
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="10" />
                                <ColumnDefinition Width="1*" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="10" />
                            </Grid.ColumnDefinitions>

                            <TextBlock Grid.Column="1" Grid.Row="0"  HorizontalAlignment="Left" Name="textBlockTitle" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Title}" VerticalAlignment="Top" FontWeight="Bold" />
                            <TextBlock Grid.Column="1" Grid.Row="1"  HorizontalAlignment="Left" Name="textBlockSubTitle" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SubTitle}" VerticalAlignment="Top" />

                            <TextBlock Grid.Column="2" Grid.Row="0" HorizontalAlignment="Left" Name="textBlockPageText" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=PageText}" VerticalAlignment="Top" Margin="0,0,5,0" />
                            <TextBlock Grid.Column="3" Grid.Row="0" HorizontalAlignment="Left" Name="textBlockPageValue" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=PageValue}" VerticalAlignment="Top" />

                            <TextBlock Grid.Column="2" Grid.Row="1" HorizontalAlignment="Left" Name="textBlockDateText" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DateText}" VerticalAlignment="Top" Margin="0,0,5,0" />
                            <TextBlock Grid.Column="3" Grid.Row="1" HorizontalAlignment="Left" Name="textBlockDateValue" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DateValue, StringFormat=\{0:d\}}" VerticalAlignment="Top" />

                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
